/**
 * Copyright (c) 2011-2012
 * OmniCore CodeGuide
 */
package de.tum.in.oose.bumpers.cars.instruments.eu;

import de.tum.in.oose.bumpers.cars.UserCar;
import de.tum.in.oose.bumpers.cars.instruments.Body;
import de.tum.in.oose.bumpers.cars.instruments.GPS;
import de.tum.in.oose.bumpers.cars.instruments.InstrumentFactory;
import de.tum.in.oose.bumpers.cars.instruments.RotationsPerSecond;
import de.tum.in.oose.bumpers.cars.instruments.SpeedController;
import de.tum.in.oose.bumpers.cars.instruments.Speedometer;

/**
 * EUFactory.
 */
public final class EUFactory extends InstrumentFactory {
	
	private static EUFactory instance;
	
	private EUFactory(){
		//singleton constructor
	}
	
	/**
	 * @return InstrumentFactory singleton
	 */
	public static InstrumentFactory getInstance(){
		if(instance == null){
			instance = new EUFactory();
		}
		return instance;
	}
	
	/**
	 * @param theCar a given Usercar
	 * @return the EURotations per second.
	 */
	public RotationsPerSecond createRotationsPerSecond(UserCar theCar) {
		return new EURotationsPerSecond(theCar);
	}
	/**
	 * 
	 * @param theCar a given Usercar
	 * @return EUSpeedcontroller
	 */
	public SpeedController createSpeedController(UserCar theCar) {
		return new EUSpeedController(theCar);
	}
	
	/**
	 * @param theCar a given Usercar
	 * @return EUSPeedometer.
	 */
	public Speedometer createSpeedometer(UserCar theCar) {
		return new EUSpeedometer(theCar);
	}
	
	/**
	 * @param theCar a given Usercar
	 * @return EUBody
	 */
	public Body createBodyView(UserCar theCar) {
		return new EUBody(theCar);
	}
	
	/**
	 * @param theCar a given Usercar
	 * @return EUGPS
	 */
	public GPS createGPS(UserCar theCar) {
		return new EUGPS(theCar);
	}
}

